package com.sea.finance.mapper;


import com.sea.finance.entity.ExchangeRate;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *  汇率表接口
 * @author 陈鸿飞
 * <br/>
 */
public interface ExchangeRateMapper {

    /**
     * 查询指定
     * @param rate
     * @return
     */
    List<ExchangeRate> findByCnd(ExchangeRate rate);

    /**
     * 新增
     * @param rate
     * @return
     */
    int insert(ExchangeRate rate);

    /**
     * 查找指定
     * @param id
     * @return
     */
    ExchangeRate findById(Integer id);

    /**
     * 修改
     * @param rate
     * @return
     */
    int update(ExchangeRate rate);

    /**
     * 查询汇率
     * @param rateFromName
     * @param rateToName
     * @return
     */
    ExchangeRate findByFromName(@Param("rateFromName")String rateFromName,@Param("rateToName")String rateToName);

    ExchangeRate findByRateName(@Param("rateFromName")String rateFromName,@Param("rateName")String rateName);
}